﻿namespace HIS
{
    /// <summary>
    /// 病案常数表
    /// </summary>
    [System.Serializable]
    public partial class MR_Constant : System.ICloneable
    {
        private System.String _ConstValid;
        /// <summary>
        /// 常数有效性(1有效0无效)
        /// </summary>
        public System.String ConstValid
        {
            get { return this._ConstValid; }
            set { this._ConstValid = value; }
        }

        private System.String _ConstType;
        /// <summary>
        /// 常数类型
        /// </summary>
        public System.String ConstType
        {
            get { return this._ConstType; }
            set { this._ConstType = value; }
        }

        private System.String _ConstID;
        /// <summary>
        /// 常数编码
        /// </summary>
        public System.String ConstID
        {
            get { return this._ConstID; }
            set { this._ConstID = value; }
        }

        private System.String _ConstParent;
        /// <summary>
        /// 常数父级
        /// </summary>
        public System.String ConstParent
        {
            get { return this._ConstParent; }
            set { this._ConstParent = value; }
        }

        private System.String _ConstName;
        /// <summary>
        /// 常数名称
        /// </summary>
        public System.String ConstName
        {
            get { return this._ConstName; }
            set { this._ConstName = value; }
        }

        private System.String _ConstSpell;
        /// <summary>
        /// ConstSpell
        /// </summary>
        public System.String ConstSpell
        {
            get { return this._ConstSpell; }
            set { this._ConstSpell = value; }
        }

        private System.String _ConstWubi;
        /// <summary>
        /// ConstWubi
        /// </summary>
        public System.String ConstWubi
        {
            get { return this._ConstWubi; }
            set { this._ConstWubi = value; }
        }

        private System.String _ConstValue;
        /// <summary>
        /// 常数值
        /// </summary>
        public System.String ConstValue
        {
            get { return this._ConstValue; }
            set { this._ConstValue = value; }
        }

        private System.Int32? _ConstOrder;
        /// <summary>
        /// 常数排序
        /// </summary>
        public System.Int32? ConstOrder
        {
            get { return this._ConstOrder; }
            set { this._ConstOrder = value; }
        }

        private System.String _ConstComment;
        /// <summary>
        /// 常数描述
        /// </summary>
        public System.String ConstComment
        {
            get { return this._ConstComment; }
            set { this._ConstComment = value; }
        }

        /// <summary>
        /// 克隆 MR_Constant 对象
        /// </summary>
        /// <returns></returns>
        public object Clone()
        {
            MR_Constant model = new MR_Constant();
            model.ConstValid = this.ConstValid;
            model.ConstType = this.ConstType;
            model.ConstID = this.ConstID;
            model.ConstParent = this.ConstParent;
            model.ConstName = this.ConstName;
            model.ConstSpell = this.ConstSpell;
            model.ConstWubi = this.ConstWubi;
            model.ConstValue = this.ConstValue;
            model.ConstOrder = this.ConstOrder;
            model.ConstComment = this.ConstComment;
            return model;
        }

        public static MR_Constant Load(System.Data.IDataReader reader)
        {
            MR_Constant model = null;
            if (reader != null && !reader.IsClosed && reader.Read())
            {
                for (int i = 0; i < reader.FieldCount; i++)
                {
                    model = new MR_Constant();
                    string name = reader.GetName(i);
                    if (string.Equals(name, "ConstValid", System.StringComparison.CurrentCultureIgnoreCase))
                        model.ConstValid = reader[i] as System.String;
                    else if (string.Equals(name, "ConstType", System.StringComparison.CurrentCultureIgnoreCase))
                        model.ConstType = reader[i] as System.String;
                    else if (string.Equals(name, "ConstID", System.StringComparison.CurrentCultureIgnoreCase))
                        model.ConstID = reader[i] as System.String;
                    else if (string.Equals(name, "ConstParent", System.StringComparison.CurrentCultureIgnoreCase))
                        model.ConstParent = reader[i] as System.String;
                    else if (string.Equals(name, "ConstName", System.StringComparison.CurrentCultureIgnoreCase))
                        model.ConstName = reader[i] as System.String;
                    else if (string.Equals(name, "ConstSpell", System.StringComparison.CurrentCultureIgnoreCase))
                        model.ConstSpell = reader[i] as System.String;
                    else if (string.Equals(name, "ConstWubi", System.StringComparison.CurrentCultureIgnoreCase))
                        model.ConstWubi = reader[i] as System.String;
                    else if (string.Equals(name, "ConstValue", System.StringComparison.CurrentCultureIgnoreCase))
                        model.ConstValue = reader[i] as System.String;
                    else if (string.Equals(name, "ConstOrder", System.StringComparison.CurrentCultureIgnoreCase))
                        model.ConstOrder = reader[i] as System.Int32?;
                    else if (string.Equals(name, "ConstComment", System.StringComparison.CurrentCultureIgnoreCase))
                        model.ConstComment = reader[i] as System.String;
                }
            }
            return model;
        }

        public static MR_Constant LoadDataRow(System.Data.DataRow row)
        {
            MR_Constant model = null;
            if (row != null)
            {
                model = new MR_Constant();
                if (row.Table.Columns.Contains("ConstValid"))
                    model.ConstValid = row["ConstValid"] as System.String;
                if (row.Table.Columns.Contains("ConstType"))
                    model.ConstType = row["ConstType"] as System.String;
                if (row.Table.Columns.Contains("ConstID"))
                    model.ConstID = row["ConstID"] as System.String;
                if (row.Table.Columns.Contains("ConstParent"))
                    model.ConstParent = row["ConstParent"] as System.String;
                if (row.Table.Columns.Contains("ConstName"))
                    model.ConstName = row["ConstName"] as System.String;
                if (row.Table.Columns.Contains("ConstSpell"))
                    model.ConstSpell = row["ConstSpell"] as System.String;
                if (row.Table.Columns.Contains("ConstWubi"))
                    model.ConstWubi = row["ConstWubi"] as System.String;
                if (row.Table.Columns.Contains("ConstValue"))
                    model.ConstValue = row["ConstValue"] as System.String;
                if (row.Table.Columns.Contains("ConstOrder"))
                    model.ConstOrder = row["ConstOrder"] as System.Int32?;
                if (row.Table.Columns.Contains("ConstComment"))
                    model.ConstComment = row["ConstComment"] as System.String;
            }
            return model;
        }

        /// <summary>
        /// 比较 MR_Constant 对象
        /// </summary>
        /// <param name="newModel"> 新的 MR_Constant 对象实例 </param>
        /// <returns> 返回哈希列表 </returns>
        public System.Collections.Hashtable Compare(MR_Constant newModel)
        {
            System.Collections.Hashtable lst = new System.Collections.Hashtable();
            if (newModel != null && newModel != this)
            {
                if (newModel.ConstValid != this.ConstValid)
                    lst.Add("ConstValid", newModel.ConstValid);
                if (newModel.ConstType != this.ConstType)
                    lst.Add("ConstType", newModel.ConstType);
                if (newModel.ConstID != this.ConstID)
                    lst.Add("ConstID", newModel.ConstID);
                if (newModel.ConstParent != this.ConstParent)
                    lst.Add("ConstParent", newModel.ConstParent);
                if (newModel.ConstName != this.ConstName)
                    lst.Add("ConstName", newModel.ConstName);
                if (newModel.ConstSpell != this.ConstSpell)
                    lst.Add("ConstSpell", newModel.ConstSpell);
                if (newModel.ConstWubi != this.ConstWubi)
                    lst.Add("ConstWubi", newModel.ConstWubi);
                if (newModel.ConstValue != this.ConstValue)
                    lst.Add("ConstValue", newModel.ConstValue);
                if (newModel.ConstOrder != this.ConstOrder)
                    lst.Add("ConstOrder", newModel.ConstOrder);
                if (newModel.ConstComment != this.ConstComment)
                    lst.Add("ConstComment", newModel.ConstComment);
            }
            return lst;
        }
    }

    /// <summary>
    /// 病案配置表
    /// </summary>
    [System.Serializable]
    public partial class MR_Setting : System.ICloneable
    {
        private System.String _SetType;
        /// <summary>
        /// 配置类型
        /// </summary>
        public System.String SetType
        {
            get { return this._SetType; }
            set { this._SetType = value; }
        }

        private System.String _SetID;
        /// <summary>
        /// 配置编码
        /// </summary>
        public System.String SetID
        {
            get { return this._SetID; }
            set { this._SetID = value; }
        }

        private System.String _SetValue;
        /// <summary>
        /// 配置值
        /// </summary>
        public System.String SetValue
        {
            get { return this._SetValue; }
            set { this._SetValue = value; }
        }

        private System.String _SetComment;
        /// <summary>
        /// 配置描述
        /// </summary>
        public System.String SetComment
        {
            get { return this._SetComment; }
            set { this._SetComment = value; }
        }

        /// <summary>
        /// 克隆 MR_Setting 对象
        /// </summary>
        /// <returns></returns>
        public object Clone()
        {
            MR_Setting model = new MR_Setting();
            model.SetType = this.SetType;
            model.SetID = this.SetID;
            model.SetValue = this.SetValue;
            model.SetComment = this.SetComment;
            return model;
        }

        public static MR_Setting Load(System.Data.IDataReader reader)
        {
            MR_Setting model = null;
            if (reader != null && !reader.IsClosed && reader.Read())
            {
                for (int i = 0; i < reader.FieldCount; i++)
                {
                    model = new MR_Setting();
                    string name = reader.GetName(i);
                    if (string.Equals(name, "SetType", System.StringComparison.CurrentCultureIgnoreCase))
                        model.SetType = reader[i] as System.String;
                    else if (string.Equals(name, "SetID", System.StringComparison.CurrentCultureIgnoreCase))
                        model.SetID = reader[i] as System.String;
                    else if (string.Equals(name, "SetValue", System.StringComparison.CurrentCultureIgnoreCase))
                        model.SetValue = reader[i] as System.String;
                    else if (string.Equals(name, "SetComment", System.StringComparison.CurrentCultureIgnoreCase))
                        model.SetComment = reader[i] as System.String;
                }
            }
            return model;
        }

        public static MR_Setting LoadDataRow(System.Data.DataRow row)
        {
            MR_Setting model = null;
            if (row != null)
            {
                model = new MR_Setting();
                if (row.Table.Columns.Contains("SetType"))
                    model.SetType = row["SetType"] as System.String;
                if (row.Table.Columns.Contains("SetID"))
                    model.SetID = row["SetID"] as System.String;
                if (row.Table.Columns.Contains("SetValue"))
                    model.SetValue = row["SetValue"] as System.String;
                if (row.Table.Columns.Contains("SetComment"))
                    model.SetComment = row["SetComment"] as System.String;
            }
            return model;
        }

        /// <summary>
        /// 比较 MR_Setting 对象
        /// </summary>
        /// <param name="newModel"> 新的 MR_Setting 对象实例 </param>
        /// <returns> 返回哈希列表 </returns>
        public System.Collections.Hashtable Compare(MR_Setting newModel)
        {
            System.Collections.Hashtable lst = new System.Collections.Hashtable();
            if (newModel != null && newModel != this)
            {
                if (newModel.SetType != this.SetType)
                    lst.Add("SetType", newModel.SetType);
                if (newModel.SetID != this.SetID)
                    lst.Add("SetID", newModel.SetID);
                if (newModel.SetValue != this.SetValue)
                    lst.Add("SetValue", newModel.SetValue);
                if (newModel.SetComment != this.SetComment)
                    lst.Add("SetComment", newModel.SetComment);
            }
            return lst;
        }
    }

    /// <summary>
    /// 病案首页基本信息档
    /// </summary>
    [System.Serializable]
    public partial class MR_BaseInfo : System.ICloneable
    {
        private System.String _PatientCardID;
        /// <summary>
        /// 病历号(患者标识)
        /// </summary>
        public System.String PatientCardID
        {
            get { return this._PatientCardID; }
            set { this._PatientCardID = value; }
        }

        private System.String _PatientName;
        /// <summary>
        /// 姓名
        /// </summary>
        public System.String PatientName
        {
            get { return this._PatientName; }
            set { this._PatientName = value; }
        }

        private System.String _InpatientSeq;
        /// <summary>
        /// 住院流水号
        /// </summary>
        public System.String InpatientSeq
        {
            get { return this._InpatientSeq; }
            set { this._InpatientSeq = value; }
        }

        private System.String _Oper_Code;
        /// <summary>
        /// Oper_Code
        /// </summary>
        public System.String Oper_Code
        {
            get { return this._Oper_Code; }
            set { this._Oper_Code = value; }
        }

        private System.DateTime? _Oper_Date;
        /// <summary>
        /// Oper_Date
        /// </summary>
        public System.DateTime? Oper_Date
        {
            get { return this._Oper_Date; }
            set { this._Oper_Date = value; }
        }

        private System.String _Oper_Name;
        /// <summary>
        /// Oper_Name
        /// </summary>
        public System.String Oper_Name
        {
            get { return this._Oper_Name; }
            set { this._Oper_Name = value; }
        }

        private System.String _InpatientID;
        /// <summary>
        /// 住院号
        /// </summary>
        public System.String InpatientID
        {
            get { return this._InpatientID; }
            set { this._InpatientID = value; }
        }

        private System.String _HealthCardID;
        /// <summary>
        /// 健康卡号
        /// </summary>
        public System.String HealthCardID
        {
            get { return this._HealthCardID; }
            set { this._HealthCardID = value; }
        }

        private System.String _FormerName;
        /// <summary>
        /// 曾用名
        /// </summary>
        public System.String FormerName
        {
            get { return this._FormerName; }
            set { this._FormerName = value; }
        }

        private System.String _SexCode;
        /// <summary>
        /// 性别编码(1.男 2.女)
        /// </summary>
        public System.String SexCode
        {
            get { return this._SexCode; }
            set { this._SexCode = value; }
        }

        private System.String _SexName;
        /// <summary>
        /// 性别名称
        /// </summary>
        public System.String SexName
        {
            get { return this._SexName; }
            set { this._SexName = value; }
        }

        private System.DateTime? _Birthday;
        /// <summary>
        /// 出生日期
        /// </summary>
        public System.DateTime? Birthday
        {
            get { return this._Birthday; }
            set { this._Birthday = value; }
        }

        private System.String _CountryCode;
        /// <summary>
        /// 国家编码
        /// </summary>
        public System.String CountryCode
        {
            get { return this._CountryCode; }
            set { this._CountryCode = value; }
        }

        private System.String _CountryName;
        /// <summary>
        /// 国家名称
        /// </summary>
        public System.String CountryName
        {
            get { return this._CountryName; }
            set { this._CountryName = value; }
        }

        private System.String _NationCode;
        /// <summary>
        /// 民族编码
        /// </summary>
        public System.String NationCode
        {
            get { return this._NationCode; }
            set { this._NationCode = value; }
        }

        private System.String _NationName;
        /// <summary>
        /// 民族名称
        /// </summary>
        public System.String NationName
        {
            get { return this._NationName; }
            set { this._NationName = value; }
        }

        private System.String _ProfessionCode;
        /// <summary>
        /// 职业编码
        /// </summary>
        public System.String ProfessionCode
        {
            get { return this._ProfessionCode; }
            set { this._ProfessionCode = value; }
        }

        private System.String _ProfessionName;
        /// <summary>
        /// 职业名称
        /// </summary>
        public System.String ProfessionName
        {
            get { return this._ProfessionName; }
            set { this._ProfessionName = value; }
        }

        private System.String _BloodGroupCode;
        /// <summary>
        /// 血型编码(1.A  2.B  3.O  4.AB  5.不详  6.未查)
        /// </summary>
        public System.String BloodGroupCode
        {
            get { return this._BloodGroupCode; }
            set { this._BloodGroupCode = value; }
        }

        private System.String _BloodGroupName;
        /// <summary>
        /// 血型名称
        /// </summary>
        public System.String BloodGroupName
        {
            get { return this._BloodGroupName; }
            set { this._BloodGroupName = value; }
        }

        private System.String _MaritalStatusCode;
        /// <summary>
        /// 婚姻状况编码(1.未婚 2.已婚 3.丧偶4.离婚 9.其他)
        /// </summary>
        public System.String MaritalStatusCode
        {
            get { return this._MaritalStatusCode; }
            set { this._MaritalStatusCode = value; }
        }

        private System.String _MaritalStatusName;
        /// <summary>
        /// 婚姻状况名称
        /// </summary>
        public System.String MaritalStatusName
        {
            get { return this._MaritalStatusName; }
            set { this._MaritalStatusName = value; }
        }

        private System.Int32? _Age;
        /// <summary>
        /// 年龄
        /// </summary>
        public System.Int32? Age
        {
            get { return this._Age; }
            set { this._Age = value; }
        }

        private System.String _AgeUnit;
        /// <summary>
        /// 年龄单位(岁月天)
        /// </summary>
        public System.String AgeUnit
        {
            get { return this._AgeUnit; }
            set { this._AgeUnit = value; }
        }

        private System.String _IDNumber;
        /// <summary>
        /// 身份证号
        /// </summary>
        public System.String IDNumber
        {
            get { return this._IDNumber; }
            set { this._IDNumber = value; }
        }

        private System.Decimal? _BabyBirthWeight;
        /// <summary>
        /// 新生儿出生体重
        /// </summary>
        public System.Decimal? BabyBirthWeight
        {
            get { return this._BabyBirthWeight; }
            set { this._BabyBirthWeight = value; }
        }

        private System.Decimal? _BabyInWeight;
        /// <summary>
        /// 新生儿入院体重
        /// </summary>
        public System.Decimal? BabyInWeight
        {
            get { return this._BabyInWeight; }
            set { this._BabyInWeight = value; }
        }

        private System.String _PactCode;
        /// <summary>
        /// 合同单位代码
        /// </summary>
        public System.String PactCode
        {
            get { return this._PactCode; }
            set { this._PactCode = value; }
        }

        private System.String _PactName;
        /// <summary>
        /// 合同单位名称
        /// </summary>
        public System.String PactName
        {
            get { return this._PactName; }
            set { this._PactName = value; }
        }

        private System.String _PayKindCode;
        /// <summary>
        /// 结算类别编码
        /// </summary>
        public System.String PayKindCode
        {
            get { return this._PayKindCode; }
            set { this._PayKindCode = value; }
        }

        private System.String _PayKindName;
        /// <summary>
        /// 结算类别名称
        /// </summary>
        public System.String PayKindName
        {
            get { return this._PayKindName; }
            set { this._PayKindName = value; }
        }

        private System.String _MedicalInsuranceID;
        /// <summary>
        /// 医疗证号
        /// </summary>
        public System.String MedicalInsuranceID
        {
            get { return this._MedicalInsuranceID; }
            set { this._MedicalInsuranceID = value; }
        }

        private System.String _NativePlaceCode;
        /// <summary>
        /// 籍贯编码
        /// </summary>
        public System.String NativePlaceCode
        {
            get { return this._NativePlaceCode; }
            set { this._NativePlaceCode = value; }
        }

        private System.String _NativePlaceName;
        /// <summary>
        /// 籍贯名称
        /// </summary>
        public System.String NativePlaceName
        {
            get { return this._NativePlaceName; }
            set { this._NativePlaceName = value; }
        }

        private System.String _NativePlaceProvince;
        /// <summary>
        /// 籍贯_省
        /// </summary>
        public System.String NativePlaceProvince
        {
            get { return this._NativePlaceProvince; }
            set { this._NativePlaceProvince = value; }
        }

        private System.String _NativePlaceCity;
        /// <summary>
        /// 籍贯_市
        /// </summary>
        public System.String NativePlaceCity
        {
            get { return this._NativePlaceCity; }
            set { this._NativePlaceCity = value; }
        }

        private System.String _NativePlaceCounty;
        /// <summary>
        /// 籍贯_县
        /// </summary>
        public System.String NativePlaceCounty
        {
            get { return this._NativePlaceCounty; }
            set { this._NativePlaceCounty = value; }
        }

        private System.String _BirthPlaceCode;
        /// <summary>
        /// 出生地编码
        /// </summary>
        public System.String BirthPlaceCode
        {
            get { return this._BirthPlaceCode; }
            set { this._BirthPlaceCode = value; }
        }

        private System.String _BirthPlaceName;
        /// <summary>
        /// 出生地名称
        /// </summary>
        public System.String BirthPlaceName
        {
            get { return this._BirthPlaceName; }
            set { this._BirthPlaceName = value; }
        }

        private System.String _BirthPlaceProvince;
        /// <summary>
        /// 出生地_省
        /// </summary>
        public System.String BirthPlaceProvince
        {
            get { return this._BirthPlaceProvince; }
            set { this._BirthPlaceProvince = value; }
        }

        private System.String _BirthPlaceCity;
        /// <summary>
        /// 出生地_市
        /// </summary>
        public System.String BirthPlaceCity
        {
            get { return this._BirthPlaceCity; }
            set { this._BirthPlaceCity = value; }
        }

        private System.String _BirthPlaceCounty;
        /// <summary>
        /// 出生地_县
        /// </summary>
        public System.String BirthPlaceCounty
        {
            get { return this._BirthPlaceCounty; }
            set { this._BirthPlaceCounty = value; }
        }

        private System.String _HomeAddressCode;
        /// <summary>
        /// 现住址编码
        /// </summary>
        public System.String HomeAddressCode
        {
            get { return this._HomeAddressCode; }
            set { this._HomeAddressCode = value; }
        }

        private System.String _HomeAddressName;
        /// <summary>
        /// 现住址名称
        /// </summary>
        public System.String HomeAddressName
        {
            get { return this._HomeAddressName; }
            set { this._HomeAddressName = value; }
        }

        private System.String _HomeAddressProvince;
        /// <summary>
        /// 现住址_省
        /// </summary>
        public System.String HomeAddressProvince
        {
            get { return this._HomeAddressProvince; }
            set { this._HomeAddressProvince = value; }
        }

        private System.String _HomeAddressCity;
        /// <summary>
        /// 现住址_市
        /// </summary>
        public System.String HomeAddressCity
        {
            get { return this._HomeAddressCity; }
            set { this._HomeAddressCity = value; }
        }

        private System.String _HomeAddressCounty;
        /// <summary>
        /// 现住址_县
        /// </summary>
        public System.String HomeAddressCounty
        {
            get { return this._HomeAddressCounty; }
            set { this._HomeAddressCounty = value; }
        }

        private System.String _HomeTel;
        /// <summary>
        /// 住址电话
        /// </summary>
        public System.String HomeTel
        {
            get { return this._HomeTel; }
            set { this._HomeTel = value; }
        }

        private System.String _HomeZip;
        /// <summary>
        /// 住址邮编
        /// </summary>
        public System.String HomeZip
        {
            get { return this._HomeZip; }
            set { this._HomeZip = value; }
        }

        private System.String _WorkAddress;
        /// <summary>
        /// 单位地址
        /// </summary>
        public System.String WorkAddress
        {
            get { return this._WorkAddress; }
            set { this._WorkAddress = value; }
        }

        private System.String _WorkTel;
        /// <summary>
        /// 单位电话
        /// </summary>
        public System.String WorkTel
        {
            get { return this._WorkTel; }
            set { this._WorkTel = value; }
        }

        private System.String _WorkZip;
        /// <summary>
        /// 单位邮编
        /// </summary>
        public System.String WorkZip
        {
            get { return this._WorkZip; }
            set { this._WorkZip = value; }
        }

        private System.String _LinkManName;
        /// <summary>
        /// 联系人姓名
        /// </summary>
        public System.String LinkManName
        {
            get { return this._LinkManName; }
            set { this._LinkManName = value; }
        }

        private System.String _LinkManRelationCode;
        /// <summary>
        /// 联系人(与患者)关系
        /// </summary>
        public System.String LinkManRelationCode
        {
            get { return this._LinkManRelationCode; }
            set { this._LinkManRelationCode = value; }
        }

        private System.String _LinkManRelationName;
        /// <summary>
        /// 联系人关系名称
        /// </summary>
        public System.String LinkManRelationName
        {
            get { return this._LinkManRelationName; }
            set { this._LinkManRelationName = value; }
        }

        private System.String _LinkManAddress;
        /// <summary>
        /// 联系人地址
        /// </summary>
        public System.String LinkManAddress
        {
            get { return this._LinkManAddress; }
            set { this._LinkManAddress = value; }
        }

        private System.String _LinkManTel;
        /// <summary>
        /// 联系人电话
        /// </summary>
        public System.String LinkManTel
        {
            get { return this._LinkManTel; }
            set { this._LinkManTel = value; }
        }

        private System.Int32? _In_Times;
        /// <summary>
        /// 住院次数
        /// </summary>
        public System.Int32? In_Times
        {
            get { return this._In_Times; }
            set { this._In_Times = value; }
        }

        private System.Int32? _In_Days;
        /// <summary>
        /// 住院天数
        /// </summary>
        public System.Int32? In_Days
        {
            get { return this._In_Days; }
            set { this._In_Days = value; }
        }

        private System.String _In_State;
        /// <summary>
        /// 入院状态
        /// </summary>
        public System.String In_State
        {
            get { return this._In_State; }
            set { this._In_State = value; }
        }

        private System.String _In_SourceCode;
        /// <summary>
        /// 入院来源(1.急诊  2.门诊  3.其他医疗机构转入  9.其他)
        /// </summary>
        public System.String In_SourceCode
        {
            get { return this._In_SourceCode; }
            set { this._In_SourceCode = value; }
        }

        private System.String _In_SourceName;
        /// <summary>
        /// 入院来源
        /// </summary>
        public System.String In_SourceName
        {
            get { return this._In_SourceName; }
            set { this._In_SourceName = value; }
        }

        private System.DateTime? _In_Date;
        /// <summary>
        /// 入院时间
        /// </summary>
        public System.DateTime? In_Date
        {
            get { return this._In_Date; }
            set { this._In_Date = value; }
        }

        private System.String _In_DeptCode;
        /// <summary>
        /// 入院科室代码
        /// </summary>
        public System.String In_DeptCode
        {
            get { return this._In_DeptCode; }
            set { this._In_DeptCode = value; }
        }

        private System.String _In_DeptName;
        /// <summary>
        /// 入院科室名称
        /// </summary>
        public System.String In_DeptName
        {
            get { return this._In_DeptName; }
            set { this._In_DeptName = value; }
        }

        private System.String _In_Ward;
        /// <summary>
        /// 入院病房名称
        /// </summary>
        public System.String In_Ward
        {
            get { return this._In_Ward; }
            set { this._In_Ward = value; }
        }

        private System.DateTime? _Out_Date;
        /// <summary>
        /// 出院日期
        /// </summary>
        public System.DateTime? Out_Date
        {
            get { return this._Out_Date; }
            set { this._Out_Date = value; }
        }

        private System.String _Out_DeptCode;
        /// <summary>
        /// 出院科室代码
        /// </summary>
        public System.String Out_DeptCode
        {
            get { return this._Out_DeptCode; }
            set { this._Out_DeptCode = value; }
        }

        private System.String _Out_DeptName;
        /// <summary>
        /// 出院科室名称
        /// </summary>
        public System.String Out_DeptName
        {
            get { return this._Out_DeptName; }
            set { this._Out_DeptName = value; }
        }

        private System.String _Out_Ward;
        /// <summary>
        /// 出院病房名称
        /// </summary>
        public System.String Out_Ward
        {
            get { return this._Out_Ward; }
            set { this._Out_Ward = value; }
        }

        private System.String _Clinic_DiagCode;
        /// <summary>
        /// 门诊诊断编码
        /// </summary>
        public System.String Clinic_DiagCode
        {
            get { return this._Clinic_DiagCode; }
            set { this._Clinic_DiagCode = value; }
        }

        private System.String _Clinic_DiagName;
        /// <summary>
        /// 门诊诊断名称
        /// </summary>
        public System.String Clinic_DiagName
        {
            get { return this._Clinic_DiagName; }
            set { this._Clinic_DiagName = value; }
        }

        private System.DateTime? _In_DiagDate;
        /// <summary>
        /// 确诊日期
        /// </summary>
        public System.DateTime? In_DiagDate
        {
            get { return this._In_DiagDate; }
            set { this._In_DiagDate = value; }
        }

        private System.String _In_DiagCode;
        /// <summary>
        /// 入院诊断编码
        /// </summary>
        public System.String In_DiagCode
        {
            get { return this._In_DiagCode; }
            set { this._In_DiagCode = value; }
        }

        private System.String _In_DiagName;
        /// <summary>
        /// 入院诊断名称
        /// </summary>
        public System.String In_DiagName
        {
            get { return this._In_DiagName; }
            set { this._In_DiagName = value; }
        }

        private System.String _AllergyFlag;
        /// <summary>
        /// 药物过敏(1.无 2.有)
        /// </summary>
        public System.String AllergyFlag
        {
            get { return this._AllergyFlag; }
            set { this._AllergyFlag = value; }
        }

        private System.String _AllergyName;
        /// <summary>
        /// 过敏药物
        /// </summary>
        public System.String AllergyName
        {
            get { return this._AllergyName; }
            set { this._AllergyName = value; }
        }

        private System.String _AutopsyFlag;
        /// <summary>
        /// 死亡患者尸检(1.是  2.否)
        /// </summary>
        public System.String AutopsyFlag
        {
            get { return this._AutopsyFlag; }
            set { this._AutopsyFlag = value; }
        }

        private System.String _Rh_Code;
        /// <summary>
        /// Rh编码(1.阴 2.阳 3.不详 4.未查)
        /// </summary>
        public System.String Rh_Code
        {
            get { return this._Rh_Code; }
            set { this._Rh_Code = value; }
        }

        private System.String _Rh_Name;
        /// <summary>
        /// Rh名称
        /// </summary>
        public System.String Rh_Name
        {
            get { return this._Rh_Name; }
            set { this._Rh_Name = value; }
        }

        private System.String _Dept_Chief_DoctCode;
        /// <summary>
        /// 科主任编码
        /// </summary>
        public System.String Dept_Chief_DoctCode
        {
            get { return this._Dept_Chief_DoctCode; }
            set { this._Dept_Chief_DoctCode = value; }
        }

        private System.String _Dept_Chief_DoctName;
        /// <summary>
        /// 科主任名称
        /// </summary>
        public System.String Dept_Chief_DoctName
        {
            get { return this._Dept_Chief_DoctName; }
            set { this._Dept_Chief_DoctName = value; }
        }

        private System.String _Chief_DoctCode;
        /// <summary>
        /// 主任医师编码
        /// </summary>
        public System.String Chief_DoctCode
        {
            get { return this._Chief_DoctCode; }
            set { this._Chief_DoctCode = value; }
        }

        private System.String _Chief_DoctName;
        /// <summary>
        /// 主任医师名称
        /// </summary>
        public System.String Chief_DoctName
        {
            get { return this._Chief_DoctName; }
            set { this._Chief_DoctName = value; }
        }

        private System.String _Attending_DoctCode;
        /// <summary>
        /// 主治医师编码
        /// </summary>
        public System.String Attending_DoctCode
        {
            get { return this._Attending_DoctCode; }
            set { this._Attending_DoctCode = value; }
        }

        private System.String _Attending_DoctName;
        /// <summary>
        /// 主治医师名称
        /// </summary>
        public System.String Attending_DoctName
        {
            get { return this._Attending_DoctName; }
            set { this._Attending_DoctName = value; }
        }

        private System.String _Resident_DoctCode;
        /// <summary>
        /// 住院医师编码
        /// </summary>
        public System.String Resident_DoctCode
        {
            get { return this._Resident_DoctCode; }
            set { this._Resident_DoctCode = value; }
        }

        private System.String _Resident_DoctName;
        /// <summary>
        /// 住院医师名称
        /// </summary>
        public System.String Resident_DoctName
        {
            get { return this._Resident_DoctName; }
            set { this._Resident_DoctName = value; }
        }

        private System.String _Duty_NurseCode;
        /// <summary>
        /// 责任护士编码
        /// </summary>
        public System.String Duty_NurseCode
        {
            get { return this._Duty_NurseCode; }
            set { this._Duty_NurseCode = value; }
        }

        private System.String _Duty_NurseName;
        /// <summary>
        /// 责任护士名称
        /// </summary>
        public System.String Duty_NurseName
        {
            get { return this._Duty_NurseName; }
            set { this._Duty_NurseName = value; }
        }

        private System.String _Refresher_DoctCode;
        /// <summary>
        /// 进修医师编码
        /// </summary>
        public System.String Refresher_DoctCode
        {
            get { return this._Refresher_DoctCode; }
            set { this._Refresher_DoctCode = value; }
        }

        private System.String _Refresher_DoctName;
        /// <summary>
        /// 进修医师名称
        /// </summary>
        public System.String Refresher_DoctName
        {
            get { return this._Refresher_DoctName; }
            set { this._Refresher_DoctName = value; }
        }

        private System.String _Intern_DoctCode;
        /// <summary>
        /// 实习医师编码
        /// </summary>
        public System.String Intern_DoctCode
        {
            get { return this._Intern_DoctCode; }
            set { this._Intern_DoctCode = value; }
        }

        private System.String _Intern_DoctName;
        /// <summary>
        /// 实习医师名称
        /// </summary>
        public System.String Intern_DoctName
        {
            get { return this._Intern_DoctName; }
            set { this._Intern_DoctName = value; }
        }

        private System.String _CoderCode;
        /// <summary>
        /// 编码员编码
        /// </summary>
        public System.String CoderCode
        {
            get { return this._CoderCode; }
            set { this._CoderCode = value; }
        }

        private System.String _CoderName;
        /// <summary>
        /// 编码员名称
        /// </summary>
        public System.String CoderName
        {
            get { return this._CoderName; }
            set { this._CoderName = value; }
        }

        private System.String _MR_ID;
        /// <summary>
        /// 病案号
        /// </summary>
        public System.String MR_ID
        {
            get { return this._MR_ID; }
            set { this._MR_ID = value; }
        }

        private System.String _MR_State;
        /// <summary>
        /// 病案状态
        /// </summary>
        public System.String MR_State
        {
            get { return this._MR_State; }
            set { this._MR_State = value; }
        }

        private System.String _MR_QualityCode;
        /// <summary>
        /// 病案质量编码(1.甲  2.乙  3.丙)
        /// </summary>
        public System.String MR_QualityCode
        {
            get { return this._MR_QualityCode; }
            set { this._MR_QualityCode = value; }
        }

        private System.String _MR_QualityName;
        /// <summary>
        /// 病案质量名称
        /// </summary>
        public System.String MR_QualityName
        {
            get { return this._MR_QualityName; }
            set { this._MR_QualityName = value; }
        }

        private System.String _QC_DoctCode;
        /// <summary>
        /// 质控医师编码
        /// </summary>
        public System.String QC_DoctCode
        {
            get { return this._QC_DoctCode; }
            set { this._QC_DoctCode = value; }
        }

        private System.String _QC_DoctName;
        /// <summary>
        /// 质控医师名称
        /// </summary>
        public System.String QC_DoctName
        {
            get { return this._QC_DoctName; }
            set { this._QC_DoctName = value; }
        }

        private System.String _QC_NurseCode;
        /// <summary>
        /// 质控护士编码
        /// </summary>
        public System.String QC_NurseCode
        {
            get { return this._QC_NurseCode; }
            set { this._QC_NurseCode = value; }
        }

        private System.String _QC_NurseName;
        /// <summary>
        /// 质控护士名称
        /// </summary>
        public System.String QC_NurseName
        {
            get { return this._QC_NurseName; }
            set { this._QC_NurseName = value; }
        }

        private System.DateTime? _QC_Date;
        /// <summary>
        /// 质控日期
        /// </summary>
        public System.DateTime? QC_Date
        {
            get { return this._QC_Date; }
            set { this._QC_Date = value; }
        }

        /// <summary>
        /// 克隆 MR_BaseInfo 对象
        /// </summary>
        /// <returns></returns>
        public object Clone()
        {
            MR_BaseInfo model = new MR_BaseInfo();
            model.PatientCardID = this.PatientCardID;
            model.PatientName = this.PatientName;
            model.InpatientSeq = this.InpatientSeq;
            model.Oper_Code = this.Oper_Code;
            model.Oper_Date = this.Oper_Date;
            model.Oper_Name = this.Oper_Name;
            model.InpatientID = this.InpatientID;
            model.HealthCardID = this.HealthCardID;
            model.FormerName = this.FormerName;
            model.SexCode = this.SexCode;
            model.SexName = this.SexName;
            model.Birthday = this.Birthday;
            model.CountryCode = this.CountryCode;
            model.CountryName = this.CountryName;
            model.NationCode = this.NationCode;
            model.NationName = this.NationName;
            model.ProfessionCode = this.ProfessionCode;
            model.ProfessionName = this.ProfessionName;
            model.BloodGroupCode = this.BloodGroupCode;
            model.BloodGroupName = this.BloodGroupName;
            model.MaritalStatusCode = this.MaritalStatusCode;
            model.MaritalStatusName = this.MaritalStatusName;
            model.Age = this.Age;
            model.AgeUnit = this.AgeUnit;
            model.IDNumber = this.IDNumber;
            model.BabyBirthWeight = this.BabyBirthWeight;
            model.BabyInWeight = this.BabyInWeight;
            model.PactCode = this.PactCode;
            model.PactName = this.PactName;
            model.PayKindCode = this.PayKindCode;
            model.PayKindName = this.PayKindName;
            model.MedicalInsuranceID = this.MedicalInsuranceID;
            model.NativePlaceCode = this.NativePlaceCode;
            model.NativePlaceName = this.NativePlaceName;
            model.NativePlaceProvince = this.NativePlaceProvince;
            model.NativePlaceCity = this.NativePlaceCity;
            model.NativePlaceCounty = this.NativePlaceCounty;
            model.BirthPlaceCode = this.BirthPlaceCode;
            model.BirthPlaceName = this.BirthPlaceName;
            model.BirthPlaceProvince = this.BirthPlaceProvince;
            model.BirthPlaceCity = this.BirthPlaceCity;
            model.BirthPlaceCounty = this.BirthPlaceCounty;
            model.HomeAddressCode = this.HomeAddressCode;
            model.HomeAddressName = this.HomeAddressName;
            model.HomeAddressProvince = this.HomeAddressProvince;
            model.HomeAddressCity = this.HomeAddressCity;
            model.HomeAddressCounty = this.HomeAddressCounty;
            model.HomeTel = this.HomeTel;
            model.HomeZip = this.HomeZip;
            model.WorkAddress = this.WorkAddress;
            model.WorkTel = this.WorkTel;
            model.WorkZip = this.WorkZip;
            model.LinkManName = this.LinkManName;
            model.LinkManRelationCode = this.LinkManRelationCode;
            model.LinkManRelationName = this.LinkManRelationName;
            model.LinkManAddress = this.LinkManAddress;
            model.LinkManTel = this.LinkManTel;
            model.In_Times = this.In_Times;
            model.In_Days = this.In_Days;
            model.In_State = this.In_State;
            model.In_SourceCode = this.In_SourceCode;
            model.In_SourceName = this.In_SourceName;
            model.In_Date = this.In_Date;
            model.In_DeptCode = this.In_DeptCode;
            model.In_DeptName = this.In_DeptName;
            model.In_Ward = this.In_Ward;
            model.Out_Date = this.Out_Date;
            model.Out_DeptCode = this.Out_DeptCode;
            model.Out_DeptName = this.Out_DeptName;
            model.Out_Ward = this.Out_Ward;
            model.Clinic_DiagCode = this.Clinic_DiagCode;
            model.Clinic_DiagName = this.Clinic_DiagName;
            model.In_DiagDate = this.In_DiagDate;
            model.In_DiagCode = this.In_DiagCode;
            model.In_DiagName = this.In_DiagName;
            model.AllergyFlag = this.AllergyFlag;
            model.AllergyName = this.AllergyName;
            model.AutopsyFlag = this.AutopsyFlag;
            model.Rh_Code = this.Rh_Code;
            model.Rh_Name = this.Rh_Name;
            model.Dept_Chief_DoctCode = this.Dept_Chief_DoctCode;
            model.Dept_Chief_DoctName = this.Dept_Chief_DoctName;
            model.Chief_DoctCode = this.Chief_DoctCode;
            model.Chief_DoctName = this.Chief_DoctName;
            model.Attending_DoctCode = this.Attending_DoctCode;
            model.Attending_DoctName = this.Attending_DoctName;
            model.Resident_DoctCode = this.Resident_DoctCode;
            model.Resident_DoctName = this.Resident_DoctName;
            model.Duty_NurseCode = this.Duty_NurseCode;
            model.Duty_NurseName = this.Duty_NurseName;
            model.Refresher_DoctCode = this.Refresher_DoctCode;
            model.Refresher_DoctName = this.Refresher_DoctName;
            model.Intern_DoctCode = this.Intern_DoctCode;
            model.Intern_DoctName = this.Intern_DoctName;
            model.CoderCode = this.CoderCode;
            model.CoderName = this.CoderName;
            model.MR_ID = this.MR_ID;
            model.MR_State = this.MR_State;
            model.MR_QualityCode = this.MR_QualityCode;
            model.MR_QualityName = this.MR_QualityName;
            model.QC_DoctCode = this.QC_DoctCode;
            model.QC_DoctName = this.QC_DoctName;
            model.QC_NurseCode = this.QC_NurseCode;
            model.QC_NurseName = this.QC_NurseName;
            model.QC_Date = this.QC_Date;
            return model;
        }

        public static MR_BaseInfo Load(System.Data.IDataReader reader)
        {
            MR_BaseInfo model = null;
            if (reader != null && !reader.IsClosed && reader.Read())
            {
                for (int i = 0; i < reader.FieldCount; i++)
                {
                    model = new MR_BaseInfo();
                    string name = reader.GetName(i);
                    if (string.Equals(name, "PatientCardID", System.StringComparison.CurrentCultureIgnoreCase))
                        model.PatientCardID = reader[i] as System.String;
                    else if (string.Equals(name, "PatientName", System.StringComparison.CurrentCultureIgnoreCase))
                        model.PatientName = reader[i] as System.String;
                    else if (string.Equals(name, "InpatientSeq", System.StringComparison.CurrentCultureIgnoreCase))
                        model.InpatientSeq = reader[i] as System.String;
                    else if (string.Equals(name, "Oper_Code", System.StringComparison.CurrentCultureIgnoreCase))
                        model.Oper_Code = reader[i] as System.String;
                    else if (string.Equals(name, "Oper_Date", System.StringComparison.CurrentCultureIgnoreCase))
                        model.Oper_Date = reader[i] as System.DateTime?;
                    else if (string.Equals(name, "Oper_Name", System.StringComparison.CurrentCultureIgnoreCase))
                        model.Oper_Name = reader[i] as System.String;
                    else if (string.Equals(name, "InpatientID", System.StringComparison.CurrentCultureIgnoreCase))
                        model.InpatientID = reader[i] as System.String;
                    else if (string.Equals(name, "HealthCardID", System.StringComparison.CurrentCultureIgnoreCase))
                        model.HealthCardID = reader[i] as System.String;
                    else if (string.Equals(name, "FormerName", System.StringComparison.CurrentCultureIgnoreCase))
                        model.FormerName = reader[i] as System.String;
                    else if (string.Equals(name, "SexCode", System.StringComparison.CurrentCultureIgnoreCase))
                        model.SexCode = reader[i] as System.String;
                    else if (string.Equals(name, "SexName", System.StringComparison.CurrentCultureIgnoreCase))
                        model.SexName = reader[i] as System.String;
                    else if (string.Equals(name, "Birthday", System.StringComparison.CurrentCultureIgnoreCase))
                        model.Birthday = reader[i] as System.DateTime?;
                    else if (string.Equals(name, "CountryCode", System.StringComparison.CurrentCultureIgnoreCase))
                        model.CountryCode = reader[i] as System.String;
                    else if (string.Equals(name, "CountryName", System.StringComparison.CurrentCultureIgnoreCase))
                        model.CountryName = reader[i] as System.String;
                    else if (string.Equals(name, "NationCode", System.StringComparison.CurrentCultureIgnoreCase))
                        model.NationCode = reader[i] as System.String;
                    else if (string.Equals(name, "NationName", System.StringComparison.CurrentCultureIgnoreCase))
                        model.NationName = reader[i] as System.String;
                    else if (string.Equals(name, "ProfessionCode", System.StringComparison.CurrentCultureIgnoreCase))
                        model.ProfessionCode = reader[i] as System.String;
                    else if (string.Equals(name, "ProfessionName", System.StringComparison.CurrentCultureIgnoreCase))
                        model.ProfessionName = reader[i] as System.String;
                    else if (string.Equals(name, "BloodGroupCode", System.StringComparison.CurrentCultureIgnoreCase))
                        model.BloodGroupCode = reader[i] as System.String;
                    else if (string.Equals(name, "BloodGroupName", System.StringComparison.CurrentCultureIgnoreCase))
                        model.BloodGroupName = reader[i] as System.String;
                    else if (string.Equals(name, "MaritalStatusCode", System.StringComparison.CurrentCultureIgnoreCase))
                        model.MaritalStatusCode = reader[i] as System.String;
                    else if (string.Equals(name, "MaritalStatusName", System.StringComparison.CurrentCultureIgnoreCase))
                        model.MaritalStatusName = reader[i] as System.String;
                    else if (string.Equals(name, "Age", System.StringComparison.CurrentCultureIgnoreCase))
                        model.Age = reader[i] as System.Int32?;
                    else if (string.Equals(name, "AgeUnit", System.StringComparison.CurrentCultureIgnoreCase))
                        model.AgeUnit = reader[i] as System.String;
                    else if (string.Equals(name, "IDNumber", System.StringComparison.CurrentCultureIgnoreCase))
                        model.IDNumber = reader[i] as System.String;
                    else if (string.Equals(name, "BabyBirthWeight", System.StringComparison.CurrentCultureIgnoreCase))
                        model.BabyBirthWeight = reader[i] as System.Decimal?;
                    else if (string.Equals(name, "BabyInWeight", System.StringComparison.CurrentCultureIgnoreCase))
                        model.BabyInWeight = reader[i] as System.Decimal?;
                    else if (string.Equals(name, "PactCode", System.StringComparison.CurrentCultureIgnoreCase))
                        model.PactCode = reader[i] as System.String;
                    else if (string.Equals(name, "PactName", System.StringComparison.CurrentCultureIgnoreCase))
                        model.PactName = reader[i] as System.String;
                    else if (string.Equals(name, "PayKindCode", System.StringComparison.CurrentCultureIgnoreCase))
                        model.PayKindCode = reader[i] as System.String;
                    else if (string.Equals(name, "PayKindName", System.StringComparison.CurrentCultureIgnoreCase))
                        model.PayKindName = reader[i] as System.String;
                    else if (string.Equals(name, "MedicalInsuranceID", System.StringComparison.CurrentCultureIgnoreCase))
                        model.MedicalInsuranceID = reader[i] as System.String;
                    else if (string.Equals(name, "NativePlaceCode", System.StringComparison.CurrentCultureIgnoreCase))
                        model.NativePlaceCode = reader[i] as System.String;
                    else if (string.Equals(name, "NativePlaceName", System.StringComparison.CurrentCultureIgnoreCase))
                        model.NativePlaceName = reader[i] as System.String;
                    else if (string.Equals(name, "NativePlaceProvince", System.StringComparison.CurrentCultureIgnoreCase))
                        model.NativePlaceProvince = reader[i] as System.String;
                    else if (string.Equals(name, "NativePlaceCity", System.StringComparison.CurrentCultureIgnoreCase))
                        model.NativePlaceCity = reader[i] as System.String;
                    else if (string.Equals(name, "NativePlaceCounty", System.StringComparison.CurrentCultureIgnoreCase))
                        model.NativePlaceCounty = reader[i] as System.String;
                    else if (string.Equals(name, "BirthPlaceCode", System.StringComparison.CurrentCultureIgnoreCase))
                        model.BirthPlaceCode = reader[i] as System.String;
                    else if (string.Equals(name, "BirthPlaceName", System.StringComparison.CurrentCultureIgnoreCase))
                        model.BirthPlaceName = reader[i] as System.String;
                    else if (string.Equals(name, "BirthPlaceProvince", System.StringComparison.CurrentCultureIgnoreCase))
                        model.BirthPlaceProvince = reader[i] as System.String;
                    else if (string.Equals(name, "BirthPlaceCity", System.StringComparison.CurrentCultureIgnoreCase))
                        model.BirthPlaceCity = reader[i] as System.String;
                    else if (string.Equals(name, "BirthPlaceCounty", System.StringComparison.CurrentCultureIgnoreCase))
                        model.BirthPlaceCounty = reader[i] as System.String;
                    else if (string.Equals(name, "HomeAddressCode", System.StringComparison.CurrentCultureIgnoreCase))
                        model.HomeAddressCode = reader[i] as System.String;
                    else if (string.Equals(name, "HomeAddressName", System.StringComparison.CurrentCultureIgnoreCase))
                        model.HomeAddressName = reader[i] as System.String;
                    else if (string.Equals(name, "HomeAddressProvince", System.StringComparison.CurrentCultureIgnoreCase))
                        model.HomeAddressProvince = reader[i] as System.String;
                    else if (string.Equals(name, "HomeAddressCity", System.StringComparison.CurrentCultureIgnoreCase))
                        model.HomeAddressCity = reader[i] as System.String;
                    else if (string.Equals(name, "HomeAddressCounty", System.StringComparison.CurrentCultureIgnoreCase))
                        model.HomeAddressCounty = reader[i] as System.String;
                    else if (string.Equals(name, "HomeTel", System.StringComparison.CurrentCultureIgnoreCase))
                        model.HomeTel = reader[i] as System.String;
                    else if (string.Equals(name, "HomeZip", System.StringComparison.CurrentCultureIgnoreCase))
                        model.HomeZip = reader[i] as System.String;
                    else if (string.Equals(name, "WorkAddress", System.StringComparison.CurrentCultureIgnoreCase))
                        model.WorkAddress = reader[i] as System.String;
                    else if (string.Equals(name, "WorkTel", System.StringComparison.CurrentCultureIgnoreCase))
                        model.WorkTel = reader[i] as System.String;
                    else if (string.Equals(name, "WorkZip", System.StringComparison.CurrentCultureIgnoreCase))
                        model.WorkZip = reader[i] as System.String;
                    else if (string.Equals(name, "LinkManName", System.StringComparison.CurrentCultureIgnoreCase))
                        model.LinkManName = reader[i] as System.String;
                    else if (string.Equals(name, "LinkManRelationCode", System.StringComparison.CurrentCultureIgnoreCase))
                        model.LinkManRelationCode = reader[i] as System.String;
                    else if (string.Equals(name, "LinkManRelationName", System.StringComparison.CurrentCultureIgnoreCase))
                        model.LinkManRelationName = reader[i] as System.String;
                    else if (string.Equals(name, "LinkManAddress", System.StringComparison.CurrentCultureIgnoreCase))
                        model.LinkManAddress = reader[i] as System.String;
                    else if (string.Equals(name, "LinkManTel", System.StringComparison.CurrentCultureIgnoreCase))
                        model.LinkManTel = reader[i] as System.String;
                    else if (string.Equals(name, "In_Times", System.StringComparison.CurrentCultureIgnoreCase))
                        model.In_Times = reader[i] as System.Int32?;
                    else if (string.Equals(name, "In_Days", System.StringComparison.CurrentCultureIgnoreCase))
                        model.In_Days = reader[i] as System.Int32?;
                    else if (string.Equals(name, "In_State", System.StringComparison.CurrentCultureIgnoreCase))
                        model.In_State = reader[i] as System.String;
                    else if (string.Equals(name, "In_SourceCode", System.StringComparison.CurrentCultureIgnoreCase))
                        model.In_SourceCode = reader[i] as System.String;
                    else if (string.Equals(name, "In_SourceName", System.StringComparison.CurrentCultureIgnoreCase))
                        model.In_SourceName = reader[i] as System.String;
                    else if (string.Equals(name, "In_Date", System.StringComparison.CurrentCultureIgnoreCase))
                        model.In_Date = reader[i] as System.DateTime?;
                    else if (string.Equals(name, "In_DeptCode", System.StringComparison.CurrentCultureIgnoreCase))
                        model.In_DeptCode = reader[i] as System.String;
                    else if (string.Equals(name, "In_DeptName", System.StringComparison.CurrentCultureIgnoreCase))
                        model.In_DeptName = reader[i] as System.String;
                    else if (string.Equals(name, "In_Ward", System.StringComparison.CurrentCultureIgnoreCase))
                        model.In_Ward = reader[i] as System.String;
                    else if (string.Equals(name, "Out_Date", System.StringComparison.CurrentCultureIgnoreCase))
                        model.Out_Date = reader[i] as System.DateTime?;
                    else if (string.Equals(name, "Out_DeptCode", System.StringComparison.CurrentCultureIgnoreCase))
                        model.Out_DeptCode = reader[i] as System.String;
                    else if (string.Equals(name, "Out_DeptName", System.StringComparison.CurrentCultureIgnoreCase))
                        model.Out_DeptName = reader[i] as System.String;
                    else if (string.Equals(name, "Out_Ward", System.StringComparison.CurrentCultureIgnoreCase))
                        model.Out_Ward = reader[i] as System.String;
                    else if (string.Equals(name, "Clinic_DiagCode", System.StringComparison.CurrentCultureIgnoreCase))
                        model.Clinic_DiagCode = reader[i] as System.String;
                    else if (string.Equals(name, "Clinic_DiagName", System.StringComparison.CurrentCultureIgnoreCase))
                        model.Clinic_DiagName = reader[i] as System.String;
                    else if (string.Equals(name, "In_DiagDate", System.StringComparison.CurrentCultureIgnoreCase))
                        model.In_DiagDate = reader[i] as System.DateTime?;
                    else if (string.Equals(name, "In_DiagCode", System.StringComparison.CurrentCultureIgnoreCase))
                        model.In_DiagCode = reader[i] as System.String;
                    else if (string.Equals(name, "In_DiagName", System.StringComparison.CurrentCultureIgnoreCase))
                        model.In_DiagName = reader[i] as System.String;
                    else if (string.Equals(name, "AllergyFlag", System.StringComparison.CurrentCultureIgnoreCase))
                        model.AllergyFlag = reader[i] as System.String;
                    else if (string.Equals(name, "AllergyName", System.StringComparison.CurrentCultureIgnoreCase))
                        model.AllergyName = reader[i] as System.String;
                    else if (string.Equals(name, "AutopsyFlag", System.StringComparison.CurrentCultureIgnoreCase))
                        model.AutopsyFlag = reader[i] as System.String;
                    else if (string.Equals(name, "Rh_Code", System.StringComparison.CurrentCultureIgnoreCase))
                        model.Rh_Code = reader[i] as System.String;
                    else if (string.Equals(name, "Rh_Name", System.StringComparison.CurrentCultureIgnoreCase))
                        model.Rh_Name = reader[i] as System.String;
                    else if (string.Equals(name, "Dept_Chief_DoctCode", System.StringComparison.CurrentCultureIgnoreCase))
                        model.Dept_Chief_DoctCode = reader[i] as System.String;
                    else if (string.Equals(name, "Dept_Chief_DoctName", System.StringComparison.CurrentCultureIgnoreCase))
                        model.Dept_Chief_DoctName = reader[i] as System.String;
                    else if (string.Equals(name, "Chief_DoctCode", System.StringComparison.CurrentCultureIgnoreCase))
                        model.Chief_DoctCode = reader[i] as System.String;
                    else if (string.Equals(name, "Chief_DoctName", System.StringComparison.CurrentCultureIgnoreCase))
                        model.Chief_DoctName = reader[i] as System.String;
                    else if (string.Equals(name, "Attending_DoctCode", System.StringComparison.CurrentCultureIgnoreCase))
                        model.Attending_DoctCode = reader[i] as System.String;
                    else if (string.Equals(name, "Attending_DoctName", System.StringComparison.CurrentCultureIgnoreCase))
                        model.Attending_DoctName = reader[i] as System.String;
                    else if (string.Equals(name, "Resident_DoctCode", System.StringComparison.CurrentCultureIgnoreCase))
                        model.Resident_DoctCode = reader[i] as System.String;
                    else if (string.Equals(name, "Resident_DoctName", System.StringComparison.CurrentCultureIgnoreCase))
                        model.Resident_DoctName = reader[i] as System.String;
                    else if (string.Equals(name, "Duty_NurseCode", System.StringComparison.CurrentCultureIgnoreCase))
                        model.Duty_NurseCode = reader[i] as System.String;
                    else if (string.Equals(name, "Duty_NurseName", System.StringComparison.CurrentCultureIgnoreCase))
                        model.Duty_NurseName = reader[i] as System.String;
                    else if (string.Equals(name, "Refresher_DoctCode", System.StringComparison.CurrentCultureIgnoreCase))
                        model.Refresher_DoctCode = reader[i] as System.String;
                    else if (string.Equals(name, "Refresher_DoctName", System.StringComparison.CurrentCultureIgnoreCase))
                        model.Refresher_DoctName = reader[i] as System.String;
                    else if (string.Equals(name, "Intern_DoctCode", System.StringComparison.CurrentCultureIgnoreCase))
                        model.Intern_DoctCode = reader[i] as System.String;
                    else if (string.Equals(name, "Intern_DoctName", System.StringComparison.CurrentCultureIgnoreCase))
                        model.Intern_DoctName = reader[i] as System.String;
                    else if (string.Equals(name, "CoderCode", System.StringComparison.CurrentCultureIgnoreCase))
                        model.CoderCode = reader[i] as System.String;
                    else if (string.Equals(name, "CoderName", System.StringComparison.CurrentCultureIgnoreCase))
                        model.CoderName = reader[i] as System.String;
                    else if (string.Equals(name, "MR_ID", System.StringComparison.CurrentCultureIgnoreCase))
                        model.MR_ID = reader[i] as System.String;
                    else if (string.Equals(name, "MR_State", System.StringComparison.CurrentCultureIgnoreCase))
                        model.MR_State = reader[i] as System.String;
                    else if (string.Equals(name, "MR_QualityCode", System.StringComparison.CurrentCultureIgnoreCase))
                        model.MR_QualityCode = reader[i] as System.String;
                    else if (string.Equals(name, "MR_QualityName", System.StringComparison.CurrentCultureIgnoreCase))
                        model.MR_QualityName = reader[i] as System.String;
                    else if (string.Equals(name, "QC_DoctCode", System.StringComparison.CurrentCultureIgnoreCase))
                        model.QC_DoctCode = reader[i] as System.String;
                    else if (string.Equals(name, "QC_DoctName", System.StringComparison.CurrentCultureIgnoreCase))
                        model.QC_DoctName = reader[i] as System.String;
                    else if (string.Equals(name, "QC_NurseCode", System.StringComparison.CurrentCultureIgnoreCase))
                        model.QC_NurseCode = reader[i] as System.String;
                    else if (string.Equals(name, "QC_NurseName", System.StringComparison.CurrentCultureIgnoreCase))
                        model.QC_NurseName = reader[i] as System.String;
                    else if (string.Equals(name, "QC_Date", System.StringComparison.CurrentCultureIgnoreCase))
                        model.QC_Date = reader[i] as System.DateTime?;
                }
            }
            return model;
        }

        public static MR_BaseInfo LoadDataRow(System.Data.DataRow row)
        {
            MR_BaseInfo model = null;
            if (row != null)
            {
                model = new MR_BaseInfo();
                if (row.Table.Columns.Contains("PatientCardID"))
                    model.PatientCardID = row["PatientCardID"] as System.String;
                if (row.Table.Columns.Contains("PatientName"))
                    model.PatientName = row["PatientName"] as System.String;
                if (row.Table.Columns.Contains("InpatientSeq"))
                    model.InpatientSeq = row["InpatientSeq"] as System.String;
                if (row.Table.Columns.Contains("Oper_Code"))
                    model.Oper_Code = row["Oper_Code"] as System.String;
                if (row.Table.Columns.Contains("Oper_Date"))
                    model.Oper_Date = row["Oper_Date"] as System.DateTime?;
                if (row.Table.Columns.Contains("Oper_Name"))
                    model.Oper_Name = row["Oper_Name"] as System.String;
                if (row.Table.Columns.Contains("InpatientID"))
                    model.InpatientID = row["InpatientID"] as System.String;
                if (row.Table.Columns.Contains("HealthCardID"))
                    model.HealthCardID = row["HealthCardID"] as System.String;
                if (row.Table.Columns.Contains("FormerName"))
                    model.FormerName = row["FormerName"] as System.String;
                if (row.Table.Columns.Contains("SexCode"))
                    model.SexCode = row["SexCode"] as System.String;
                if (row.Table.Columns.Contains("SexName"))
                    model.SexName = row["SexName"] as System.String;
                if (row.Table.Columns.Contains("Birthday"))
                    model.Birthday = row["Birthday"] as System.DateTime?;
                if (row.Table.Columns.Contains("CountryCode"))
                    model.CountryCode = row["CountryCode"] as System.String;
                if (row.Table.Columns.Contains("CountryName"))
                    model.CountryName = row["CountryName"] as System.String;
                if (row.Table.Columns.Contains("NationCode"))
                    model.NationCode = row["NationCode"] as System.String;
                if (row.Table.Columns.Contains("NationName"))
                    model.NationName = row["NationName"] as System.String;
                if (row.Table.Columns.Contains("ProfessionCode"))
                    model.ProfessionCode = row["ProfessionCode"] as System.String;
                if (row.Table.Columns.Contains("ProfessionName"))
                    model.ProfessionName = row["ProfessionName"] as System.String;
                if (row.Table.Columns.Contains("BloodGroupCode"))
                    model.BloodGroupCode = row["BloodGroupCode"] as System.String;
                if (row.Table.Columns.Contains("BloodGroupName"))
                    model.BloodGroupName = row["BloodGroupName"] as System.String;
                if (row.Table.Columns.Contains("MaritalStatusCode"))
                    model.MaritalStatusCode = row["MaritalStatusCode"] as System.String;
                if (row.Table.Columns.Contains("MaritalStatusName"))
                    model.MaritalStatusName = row["MaritalStatusName"] as System.String;
                if (row.Table.Columns.Contains("Age"))
                    model.Age = row["Age"] as System.Int32?;
                if (row.Table.Columns.Contains("AgeUnit"))
                    model.AgeUnit = row["AgeUnit"] as System.String;
                if (row.Table.Columns.Contains("IDNumber"))
                    model.IDNumber = row["IDNumber"] as System.String;
                if (row.Table.Columns.Contains("BabyBirthWeight"))
                    model.BabyBirthWeight = row["BabyBirthWeight"] as System.Decimal?;
                if (row.Table.Columns.Contains("BabyInWeight"))
                    model.BabyInWeight = row["BabyInWeight"] as System.Decimal?;
                if (row.Table.Columns.Contains("PactCode"))
                    model.PactCode = row["PactCode"] as System.String;
                if (row.Table.Columns.Contains("PactName"))
                    model.PactName = row["PactName"] as System.String;
                if (row.Table.Columns.Contains("PayKindCode"))
                    model.PayKindCode = row["PayKindCode"] as System.String;
                if (row.Table.Columns.Contains("PayKindName"))
                    model.PayKindName = row["PayKindName"] as System.String;
                if (row.Table.Columns.Contains("MedicalInsuranceID"))
                    model.MedicalInsuranceID = row["MedicalInsuranceID"] as System.String;
                if (row.Table.Columns.Contains("NativePlaceCode"))
                    model.NativePlaceCode = row["NativePlaceCode"] as System.String;
                if (row.Table.Columns.Contains("NativePlaceName"))
                    model.NativePlaceName = row["NativePlaceName"] as System.String;
                if (row.Table.Columns.Contains("NativePlaceProvince"))
                    model.NativePlaceProvince = row["NativePlaceProvince"] as System.String;
                if (row.Table.Columns.Contains("NativePlaceCity"))
                    model.NativePlaceCity = row["NativePlaceCity"] as System.String;
                if (row.Table.Columns.Contains("NativePlaceCounty"))
                    model.NativePlaceCounty = row["NativePlaceCounty"] as System.String;
                if (row.Table.Columns.Contains("BirthPlaceCode"))
                    model.BirthPlaceCode = row["BirthPlaceCode"] as System.String;
                if (row.Table.Columns.Contains("BirthPlaceName"))
                    model.BirthPlaceName = row["BirthPlaceName"] as System.String;
                if (row.Table.Columns.Contains("BirthPlaceProvince"))
                    model.BirthPlaceProvince = row["BirthPlaceProvince"] as System.String;
                if (row.Table.Columns.Contains("BirthPlaceCity"))
                    model.BirthPlaceCity = row["BirthPlaceCity"] as System.String;
                if (row.Table.Columns.Contains("BirthPlaceCounty"))
                    model.BirthPlaceCounty = row["BirthPlaceCounty"] as System.String;
                if (row.Table.Columns.Contains("HomeAddressCode"))
                    model.HomeAddressCode = row["HomeAddressCode"] as System.String;
                if (row.Table.Columns.Contains("HomeAddressName"))
                    model.HomeAddressName = row["HomeAddressName"] as System.String;
                if (row.Table.Columns.Contains("HomeAddressProvince"))
                    model.HomeAddressProvince = row["HomeAddressProvince"] as System.String;
                if (row.Table.Columns.Contains("HomeAddressCity"))
                    model.HomeAddressCity = row["HomeAddressCity"] as System.String;
                if (row.Table.Columns.Contains("HomeAddressCounty"))
                    model.HomeAddressCounty = row["HomeAddressCounty"] as System.String;
                if (row.Table.Columns.Contains("HomeTel"))
                    model.HomeTel = row["HomeTel"] as System.String;
                if (row.Table.Columns.Contains("HomeZip"))
                    model.HomeZip = row["HomeZip"] as System.String;
                if (row.Table.Columns.Contains("WorkAddress"))
                    model.WorkAddress = row["WorkAddress"] as System.String;
                if (row.Table.Columns.Contains("WorkTel"))
                    model.WorkTel = row["WorkTel"] as System.String;
                if (row.Table.Columns.Contains("WorkZip"))
                    model.WorkZip = row["WorkZip"] as System.String;
                if (row.Table.Columns.Contains("LinkManName"))
                    model.LinkManName = row["LinkManName"] as System.String;
                if (row.Table.Columns.Contains("LinkManRelationCode"))
                    model.LinkManRelationCode = row["LinkManRelationCode"] as System.String;
                if (row.Table.Columns.Contains("LinkManRelationName"))
                    model.LinkManRelationName = row["LinkManRelationName"] as System.String;
                if (row.Table.Columns.Contains("LinkManAddress"))
                    model.LinkManAddress = row["LinkManAddress"] as System.String;
                if (row.Table.Columns.Contains("LinkManTel"))
                    model.LinkManTel = row["LinkManTel"] as System.String;
                if (row.Table.Columns.Contains("In_Times"))
                    model.In_Times = row["In_Times"] as System.Int32?;
                if (row.Table.Columns.Contains("In_Days"))
                    model.In_Days = row["In_Days"] as System.Int32?;
                if (row.Table.Columns.Contains("In_State"))
                    model.In_State = row["In_State"] as System.String;
                if (row.Table.Columns.Contains("In_SourceCode"))
                    model.In_SourceCode = row["In_SourceCode"] as System.String;
                if (row.Table.Columns.Contains("In_SourceName"))
                    model.In_SourceName = row["In_SourceName"] as System.String;
                if (row.Table.Columns.Contains("In_Date"))
                    model.In_Date = row["In_Date"] as System.DateTime?;
                if (row.Table.Columns.Contains("In_DeptCode"))
                    model.In_DeptCode = row["In_DeptCode"] as System.String;
                if (row.Table.Columns.Contains("In_DeptName"))
                    model.In_DeptName = row["In_DeptName"] as System.String;
                if (row.Table.Columns.Contains("In_Ward"))
                    model.In_Ward = row["In_Ward"] as System.String;
                if (row.Table.Columns.Contains("Out_Date"))
                    model.Out_Date = row["Out_Date"] as System.DateTime?;
                if (row.Table.Columns.Contains("Out_DeptCode"))
                    model.Out_DeptCode = row["Out_DeptCode"] as System.String;
                if (row.Table.Columns.Contains("Out_DeptName"))
                    model.Out_DeptName = row["Out_DeptName"] as System.String;
                if (row.Table.Columns.Contains("Out_Ward"))
                    model.Out_Ward = row["Out_Ward"] as System.String;
                if (row.Table.Columns.Contains("Clinic_DiagCode"))
                    model.Clinic_DiagCode = row["Clinic_DiagCode"] as System.String;
                if (row.Table.Columns.Contains("Clinic_DiagName"))
                    model.Clinic_DiagName = row["Clinic_DiagName"] as System.String;
                if (row.Table.Columns.Contains("In_DiagDate"))
                    model.In_DiagDate = row["In_DiagDate"] as System.DateTime?;
                if (row.Table.Columns.Contains("In_DiagCode"))
                    model.In_DiagCode = row["In_DiagCode"] as System.String;
                if (row.Table.Columns.Contains("In_DiagName"))
                    model.In_DiagName = row["In_DiagName"] as System.String;
                if (row.Table.Columns.Contains("AllergyFlag"))
                    model.AllergyFlag = row["AllergyFlag"] as System.String;
                if (row.Table.Columns.Contains("AllergyName"))
                    model.AllergyName = row["AllergyName"] as System.String;
                if (row.Table.Columns.Contains("AutopsyFlag"))
                    model.AutopsyFlag = row["AutopsyFlag"] as System.String;
                if (row.Table.Columns.Contains("Rh_Code"))
                    model.Rh_Code = row["Rh_Code"] as System.String;
                if (row.Table.Columns.Contains("Rh_Name"))
                    model.Rh_Name = row["Rh_Name"] as System.String;
                if (row.Table.Columns.Contains("Dept_Chief_DoctCode"))
                    model.Dept_Chief_DoctCode = row["Dept_Chief_DoctCode"] as System.String;
                if (row.Table.Columns.Contains("Dept_Chief_DoctName"))
                    model.Dept_Chief_DoctName = row["Dept_Chief_DoctName"] as System.String;
                if (row.Table.Columns.Contains("Chief_DoctCode"))
                    model.Chief_DoctCode = row["Chief_DoctCode"] as System.String;
                if (row.Table.Columns.Contains("Chief_DoctName"))
                    model.Chief_DoctName = row["Chief_DoctName"] as System.String;
                if (row.Table.Columns.Contains("Attending_DoctCode"))
                    model.Attending_DoctCode = row["Attending_DoctCode"] as System.String;
                if (row.Table.Columns.Contains("Attending_DoctName"))
                    model.Attending_DoctName = row["Attending_DoctName"] as System.String;
                if (row.Table.Columns.Contains("Resident_DoctCode"))
                    model.Resident_DoctCode = row["Resident_DoctCode"] as System.String;
                if (row.Table.Columns.Contains("Resident_DoctName"))
                    model.Resident_DoctName = row["Resident_DoctName"] as System.String;
                if (row.Table.Columns.Contains("Duty_NurseCode"))
                    model.Duty_NurseCode = row["Duty_NurseCode"] as System.String;
                if (row.Table.Columns.Contains("Duty_NurseName"))
                    model.Duty_NurseName = row["Duty_NurseName"] as System.String;
                if (row.Table.Columns.Contains("Refresher_DoctCode"))
                    model.Refresher_DoctCode = row["Refresher_DoctCode"] as System.String;
                if (row.Table.Columns.Contains("Refresher_DoctName"))
                    model.Refresher_DoctName = row["Refresher_DoctName"] as System.String;
                if (row.Table.Columns.Contains("Intern_DoctCode"))
                    model.Intern_DoctCode = row["Intern_DoctCode"] as System.String;
                if (row.Table.Columns.Contains("Intern_DoctName"))
                    model.Intern_DoctName = row["Intern_DoctName"] as System.String;
                if (row.Table.Columns.Contains("CoderCode"))
                    model.CoderCode = row["CoderCode"] as System.String;
                if (row.Table.Columns.Contains("CoderName"))
                    model.CoderName = row["CoderName"] as System.String;
                if (row.Table.Columns.Contains("MR_ID"))
                    model.MR_ID = row["MR_ID"] as System.String;
                if (row.Table.Columns.Contains("MR_State"))
                    model.MR_State = row["MR_State"] as System.String;
                if (row.Table.Columns.Contains("MR_QualityCode"))
                    model.MR_QualityCode = row["MR_QualityCode"] as System.String;
                if (row.Table.Columns.Contains("MR_QualityName"))
                    model.MR_QualityName = row["MR_QualityName"] as System.String;
                if (row.Table.Columns.Contains("QC_DoctCode"))
                    model.QC_DoctCode = row["QC_DoctCode"] as System.String;
                if (row.Table.Columns.Contains("QC_DoctName"))
                    model.QC_DoctName = row["QC_DoctName"] as System.String;
                if (row.Table.Columns.Contains("QC_NurseCode"))
                    model.QC_NurseCode = row["QC_NurseCode"] as System.String;
                if (row.Table.Columns.Contains("QC_NurseName"))
                    model.QC_NurseName = row["QC_NurseName"] as System.String;
                if (row.Table.Columns.Contains("QC_Date"))
                    model.QC_Date = row["QC_Date"] as System.DateTime?;
            }
            return model;
        }

        /// <summary>
        /// 比较 MR_BaseInfo 对象
        /// </summary>
        /// <param name="newModel"> 新的 MR_BaseInfo 对象实例 </param>
        /// <returns> 返回哈希列表 </returns>
        public System.Collections.Hashtable Compare(MR_BaseInfo newModel)
        {
            System.Collections.Hashtable lst = new System.Collections.Hashtable();
            if (newModel != null && newModel != this)
            {
                if (newModel.PatientCardID != this.PatientCardID)
                    lst.Add("PatientCardID", newModel.PatientCardID);
                if (newModel.PatientName != this.PatientName)
                    lst.Add("PatientName", newModel.PatientName);
                if (newModel.InpatientSeq != this.InpatientSeq)
                    lst.Add("InpatientSeq", newModel.InpatientSeq);
                if (newModel.Oper_Code != this.Oper_Code)
                    lst.Add("Oper_Code", newModel.Oper_Code);
                if (newModel.Oper_Date != this.Oper_Date)
                    lst.Add("Oper_Date", newModel.Oper_Date);
                if (newModel.Oper_Name != this.Oper_Name)
                    lst.Add("Oper_Name", newModel.Oper_Name);
                if (newModel.InpatientID != this.InpatientID)
                    lst.Add("InpatientID", newModel.InpatientID);
                if (newModel.HealthCardID != this.HealthCardID)
                    lst.Add("HealthCardID", newModel.HealthCardID);
                if (newModel.FormerName != this.FormerName)
                    lst.Add("FormerName", newModel.FormerName);
                if (newModel.SexCode != this.SexCode)
                    lst.Add("SexCode", newModel.SexCode);
                if (newModel.SexName != this.SexName)
                    lst.Add("SexName", newModel.SexName);
                if (newModel.Birthday != this.Birthday)
                    lst.Add("Birthday", newModel.Birthday);
                if (newModel.CountryCode != this.CountryCode)
                    lst.Add("CountryCode", newModel.CountryCode);
                if (newModel.CountryName != this.CountryName)
                    lst.Add("CountryName", newModel.CountryName);
                if (newModel.NationCode != this.NationCode)
                    lst.Add("NationCode", newModel.NationCode);
                if (newModel.NationName != this.NationName)
                    lst.Add("NationName", newModel.NationName);
                if (newModel.ProfessionCode != this.ProfessionCode)
                    lst.Add("ProfessionCode", newModel.ProfessionCode);
                if (newModel.ProfessionName != this.ProfessionName)
                    lst.Add("ProfessionName", newModel.ProfessionName);
                if (newModel.BloodGroupCode != this.BloodGroupCode)
                    lst.Add("BloodGroupCode", newModel.BloodGroupCode);
                if (newModel.BloodGroupName != this.BloodGroupName)
                    lst.Add("BloodGroupName", newModel.BloodGroupName);
                if (newModel.MaritalStatusCode != this.MaritalStatusCode)
                    lst.Add("MaritalStatusCode", newModel.MaritalStatusCode);
                if (newModel.MaritalStatusName != this.MaritalStatusName)
                    lst.Add("MaritalStatusName", newModel.MaritalStatusName);
                if (newModel.Age != this.Age)
                    lst.Add("Age", newModel.Age);
                if (newModel.AgeUnit != this.AgeUnit)
                    lst.Add("AgeUnit", newModel.AgeUnit);
                if (newModel.IDNumber != this.IDNumber)
                    lst.Add("IDNumber", newModel.IDNumber);
                if (newModel.BabyBirthWeight != this.BabyBirthWeight)
                    lst.Add("BabyBirthWeight", newModel.BabyBirthWeight);
                if (newModel.BabyInWeight != this.BabyInWeight)
                    lst.Add("BabyInWeight", newModel.BabyInWeight);
                if (newModel.PactCode != this.PactCode)
                    lst.Add("PactCode", newModel.PactCode);
                if (newModel.PactName != this.PactName)
                    lst.Add("PactName", newModel.PactName);
                if (newModel.PayKindCode != this.PayKindCode)
                    lst.Add("PayKindCode", newModel.PayKindCode);
                if (newModel.PayKindName != this.PayKindName)
                    lst.Add("PayKindName", newModel.PayKindName);
                if (newModel.MedicalInsuranceID != this.MedicalInsuranceID)
                    lst.Add("MedicalInsuranceID", newModel.MedicalInsuranceID);
                if (newModel.NativePlaceCode != this.NativePlaceCode)
                    lst.Add("NativePlaceCode", newModel.NativePlaceCode);
                if (newModel.NativePlaceName != this.NativePlaceName)
                    lst.Add("NativePlaceName", newModel.NativePlaceName);
                if (newModel.NativePlaceProvince != this.NativePlaceProvince)
                    lst.Add("NativePlaceProvince", newModel.NativePlaceProvince);
                if (newModel.NativePlaceCity != this.NativePlaceCity)
                    lst.Add("NativePlaceCity", newModel.NativePlaceCity);
                if (newModel.NativePlaceCounty != this.NativePlaceCounty)
                    lst.Add("NativePlaceCounty", newModel.NativePlaceCounty);
                if (newModel.BirthPlaceCode != this.BirthPlaceCode)
                    lst.Add("BirthPlaceCode", newModel.BirthPlaceCode);
                if (newModel.BirthPlaceName != this.BirthPlaceName)
                    lst.Add("BirthPlaceName", newModel.BirthPlaceName);
                if (newModel.BirthPlaceProvince != this.BirthPlaceProvince)
                    lst.Add("BirthPlaceProvince", newModel.BirthPlaceProvince);
                if (newModel.BirthPlaceCity != this.BirthPlaceCity)
                    lst.Add("BirthPlaceCity", newModel.BirthPlaceCity);
                if (newModel.BirthPlaceCounty != this.BirthPlaceCounty)
                    lst.Add("BirthPlaceCounty", newModel.BirthPlaceCounty);
                if (newModel.HomeAddressCode != this.HomeAddressCode)
                    lst.Add("HomeAddressCode", newModel.HomeAddressCode);
                if (newModel.HomeAddressName != this.HomeAddressName)
                    lst.Add("HomeAddressName", newModel.HomeAddressName);
                if (newModel.HomeAddressProvince != this.HomeAddressProvince)
                    lst.Add("HomeAddressProvince", newModel.HomeAddressProvince);
                if (newModel.HomeAddressCity != this.HomeAddressCity)
                    lst.Add("HomeAddressCity", newModel.HomeAddressCity);
                if (newModel.HomeAddressCounty != this.HomeAddressCounty)
                    lst.Add("HomeAddressCounty", newModel.HomeAddressCounty);
                if (newModel.HomeTel != this.HomeTel)
                    lst.Add("HomeTel", newModel.HomeTel);
                if (newModel.HomeZip != this.HomeZip)
                    lst.Add("HomeZip", newModel.HomeZip);
                if (newModel.WorkAddress != this.WorkAddress)
                    lst.Add("WorkAddress", newModel.WorkAddress);
                if (newModel.WorkTel != this.WorkTel)
                    lst.Add("WorkTel", newModel.WorkTel);
                if (newModel.WorkZip != this.WorkZip)
                    lst.Add("WorkZip", newModel.WorkZip);
                if (newModel.LinkManName != this.LinkManName)
                    lst.Add("LinkManName", newModel.LinkManName);
                if (newModel.LinkManRelationCode != this.LinkManRelationCode)
                    lst.Add("LinkManRelationCode", newModel.LinkManRelationCode);
                if (newModel.LinkManRelationName != this.LinkManRelationName)
                    lst.Add("LinkManRelationName", newModel.LinkManRelationName);
                if (newModel.LinkManAddress != this.LinkManAddress)
                    lst.Add("LinkManAddress", newModel.LinkManAddress);
                if (newModel.LinkManTel != this.LinkManTel)
                    lst.Add("LinkManTel", newModel.LinkManTel);
                if (newModel.In_Times != this.In_Times)
                    lst.Add("In_Times", newModel.In_Times);
                if (newModel.In_Days != this.In_Days)
                    lst.Add("In_Days", newModel.In_Days);
                if (newModel.In_State != this.In_State)
                    lst.Add("In_State", newModel.In_State);
                if (newModel.In_SourceCode != this.In_SourceCode)
                    lst.Add("In_SourceCode", newModel.In_SourceCode);
                if (newModel.In_SourceName != this.In_SourceName)
                    lst.Add("In_SourceName", newModel.In_SourceName);
                if (newModel.In_Date != this.In_Date)
                    lst.Add("In_Date", newModel.In_Date);
                if (newModel.In_DeptCode != this.In_DeptCode)
                    lst.Add("In_DeptCode", newModel.In_DeptCode);
                if (newModel.In_DeptName != this.In_DeptName)
                    lst.Add("In_DeptName", newModel.In_DeptName);
                if (newModel.In_Ward != this.In_Ward)
                    lst.Add("In_Ward", newModel.In_Ward);
                if (newModel.Out_Date != this.Out_Date)
                    lst.Add("Out_Date", newModel.Out_Date);
                if (newModel.Out_DeptCode != this.Out_DeptCode)
                    lst.Add("Out_DeptCode", newModel.Out_DeptCode);
                if (newModel.Out_DeptName != this.Out_DeptName)
                    lst.Add("Out_DeptName", newModel.Out_DeptName);
                if (newModel.Out_Ward != this.Out_Ward)
                    lst.Add("Out_Ward", newModel.Out_Ward);
                if (newModel.Clinic_DiagCode != this.Clinic_DiagCode)
                    lst.Add("Clinic_DiagCode", newModel.Clinic_DiagCode);
                if (newModel.Clinic_DiagName != this.Clinic_DiagName)
                    lst.Add("Clinic_DiagName", newModel.Clinic_DiagName);
                if (newModel.In_DiagDate != this.In_DiagDate)
                    lst.Add("In_DiagDate", newModel.In_DiagDate);
                if (newModel.In_DiagCode != this.In_DiagCode)
                    lst.Add("In_DiagCode", newModel.In_DiagCode);
                if (newModel.In_DiagName != this.In_DiagName)
                    lst.Add("In_DiagName", newModel.In_DiagName);
                if (newModel.AllergyFlag != this.AllergyFlag)
                    lst.Add("AllergyFlag", newModel.AllergyFlag);
                if (newModel.AllergyName != this.AllergyName)
                    lst.Add("AllergyName", newModel.AllergyName);
                if (newModel.AutopsyFlag != this.AutopsyFlag)
                    lst.Add("AutopsyFlag", newModel.AutopsyFlag);
                if (newModel.Rh_Code != this.Rh_Code)
                    lst.Add("Rh_Code", newModel.Rh_Code);
                if (newModel.Rh_Name != this.Rh_Name)
                    lst.Add("Rh_Name", newModel.Rh_Name);
                if (newModel.Dept_Chief_DoctCode != this.Dept_Chief_DoctCode)
                    lst.Add("Dept_Chief_DoctCode", newModel.Dept_Chief_DoctCode);
                if (newModel.Dept_Chief_DoctName != this.Dept_Chief_DoctName)
                    lst.Add("Dept_Chief_DoctName", newModel.Dept_Chief_DoctName);
                if (newModel.Chief_DoctCode != this.Chief_DoctCode)
                    lst.Add("Chief_DoctCode", newModel.Chief_DoctCode);
                if (newModel.Chief_DoctName != this.Chief_DoctName)
                    lst.Add("Chief_DoctName", newModel.Chief_DoctName);
                if (newModel.Attending_DoctCode != this.Attending_DoctCode)
                    lst.Add("Attending_DoctCode", newModel.Attending_DoctCode);
                if (newModel.Attending_DoctName != this.Attending_DoctName)
                    lst.Add("Attending_DoctName", newModel.Attending_DoctName);
                if (newModel.Resident_DoctCode != this.Resident_DoctCode)
                    lst.Add("Resident_DoctCode", newModel.Resident_DoctCode);
                if (newModel.Resident_DoctName != this.Resident_DoctName)
                    lst.Add("Resident_DoctName", newModel.Resident_DoctName);
                if (newModel.Duty_NurseCode != this.Duty_NurseCode)
                    lst.Add("Duty_NurseCode", newModel.Duty_NurseCode);
                if (newModel.Duty_NurseName != this.Duty_NurseName)
                    lst.Add("Duty_NurseName", newModel.Duty_NurseName);
                if (newModel.Refresher_DoctCode != this.Refresher_DoctCode)
                    lst.Add("Refresher_DoctCode", newModel.Refresher_DoctCode);
                if (newModel.Refresher_DoctName != this.Refresher_DoctName)
                    lst.Add("Refresher_DoctName", newModel.Refresher_DoctName);
                if (newModel.Intern_DoctCode != this.Intern_DoctCode)
                    lst.Add("Intern_DoctCode", newModel.Intern_DoctCode);
                if (newModel.Intern_DoctName != this.Intern_DoctName)
                    lst.Add("Intern_DoctName", newModel.Intern_DoctName);
                if (newModel.CoderCode != this.CoderCode)
                    lst.Add("CoderCode", newModel.CoderCode);
                if (newModel.CoderName != this.CoderName)
                    lst.Add("CoderName", newModel.CoderName);
                if (newModel.MR_ID != this.MR_ID)
                    lst.Add("MR_ID", newModel.MR_ID);
                if (newModel.MR_State != this.MR_State)
                    lst.Add("MR_State", newModel.MR_State);
                if (newModel.MR_QualityCode != this.MR_QualityCode)
                    lst.Add("MR_QualityCode", newModel.MR_QualityCode);
                if (newModel.MR_QualityName != this.MR_QualityName)
                    lst.Add("MR_QualityName", newModel.MR_QualityName);
                if (newModel.QC_DoctCode != this.QC_DoctCode)
                    lst.Add("QC_DoctCode", newModel.QC_DoctCode);
                if (newModel.QC_DoctName != this.QC_DoctName)
                    lst.Add("QC_DoctName", newModel.QC_DoctName);
                if (newModel.QC_NurseCode != this.QC_NurseCode)
                    lst.Add("QC_NurseCode", newModel.QC_NurseCode);
                if (newModel.QC_NurseName != this.QC_NurseName)
                    lst.Add("QC_NurseName", newModel.QC_NurseName);
                if (newModel.QC_Date != this.QC_Date)
                    lst.Add("QC_Date", newModel.QC_Date);
            }
            return lst;
        }
    }

}
